package com.pany.domain;

public interface IConstant
{
    String USER_TYPE_ADMIN = "1";

    String USER_TYPE_OPERATOR = "2";

    String USER_TYPE_CUSTOMER = "3";

    String TRAN_TYPE_STATUS_ENABLE = "1";

    String TRAN_TYPE_STATUS_DISABLE = "0";

    public interface ISysConstant
    {
        String USER_SESSION_KEY = "App_User_Key";

        String SESSION_ID_NAME = "sid";
    }

    public interface IDictType
    {
        String USER_TYPE_DICTTYPE = "USER_TYPE";

        String SEX_NAME_DICTTYPE = "SEX_NAME";

        String LEVEL_NAME_DICTTYPE = "VIP_LEVEL";

        String STATUS_NAME_DICTTYPE = "STATUS_NAME";
    }

    public interface ICommonResultCode
    {
        /**
         * 成功
         */
        int SUCCESS = 0;

        /**
         * 系统错误
         */
        int SYSTEM_ERROR = 9999;

        /**
         * 鉴权失败
         */
        int AUTH_FAIL = 9998;

        /**
         * 数据库错误
         */
        int DATABASE_ERROR = 9997;

        /**
         * 没有此功能
         */
        int NO_FUNCTION_ERROR = 9996;

        /**
         * 参数为空
         */
        int PARAMTER_IS_NULL = 9995;
        /**
         * 参数非法
         */
        int PARAMTER_IS_ILLEGAL = 9994;
    }

    /**
     * 用户相关错误码1~999
     * */
    public interface IUserResultCode
    {
        /**
         * 登陆失败,用户名或者密码错误
         */
        int LOGIN_FAIL_UNAME_PWD_UNMATCH = 1;

        /**
         * 登陆失败，顾客用户不能登陆
         */
        int CUSTOMER_LOGIN_PREVENTED = 2;

        /**
         * 用户名重复
         */
        int CREATE_FAIL_USER_REPEAT = 3;

        /**
         * 会员不存在
         */
        int VIP_NOT_EXSIT = 4;

    }

    /**
     * 交易错误
     * 
     * @author wangyi
     * 
     */
    public interface ITranResultCode
    {
        /**
         * 操作类型错误
         */
        int OPER_TYPE_ERROR = 1000;

        /**
         * 顾客余额不足
         */
        int BALANCE_SHORTAGE_ERROR = 1001;

        /**
         * 交易金额为非正数
         */
        int TRANAMT_NOTPOSITIVE_ERROR = 1002;

        /**
         * 会员密码不匹配
         */
        int TRAN_MEMBER_PASSWD_UNCORRECT = 1003;

        /**
         * 消费项不存在
         */
        int TRAN_TYPE_NOT_EXITS = 1004;
    }
}
